﻿using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;
using Volo.Abp;
using System.ComponentModel.DataAnnotations.Schema;
using System.Globalization;

namespace Himp.Platform.Dc
{
    /// <summary>
    /// 药理分类
    /// </summary>
    [Table("PHAM_TYPE")]
    public class PhamType : Entity<Guid>, IMultiTenant, ISoftDelete
    {
        /// <summary>
        /// 药理分类编码
        /// </summary>
        [Column("PHAM_TYPE_CODG")]
        public string PhamTypeCodg { get; set; }

        /// <summary>
        /// 药理分类名称
        /// </summary>
        [Column("PHAM_TYPE_NAME")]
        public string PhamTypeName { get; set; }

        public Guid DrugTypeId { get; set; }

        /// <summary>
        /// 药品类别
        /// </summary>
        public DrugType DrugType { get; set; }

        /// <summary>
        /// 有效标识
        /// </summary>
        [Column("VALI_FLAG")]
        public bool ValiFlag { get; set; }

        /// <summary>
        /// 上级药理分类
        /// </summary>
        public PhamType? Parent { get; set; }

        /// <summary>
        /// 下级药理分类
        /// </summary>
        public List<PhamType> Children { get; set; }

        /// <summary>
        /// 药物类型代码(medn_type_code)
        /// </summary>
        [Column("MEDN_TYPE_CODE")]
        public string MednTypeCode { get; set; }

        /// <summary>
        /// 药理分类名称
        /// </summary>
        [Column("MEDN_TYPE_NAME")]
        public string MednTypeName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 删除标志
        /// </summary>
        public bool IsDeleted { get; set; }
    }
}
